
#include"SList.h"
#include"SListFunc.h"

int main()
{
	//SList<double>* sl = new SList<double>;
	//while (sl)
	//{
	//	cout << sl->data << endl;
	//	sl = sl->next;
	//}

	using namespace SListFunc;

	SList<int>* iSL = new SList<int>;
	Push_back(iSL, 10);
	Push_back(iSL, 20);
	Push_back(iSL, 30);
	Push_front(iSL, 60);
	Push_front(iSL, 50);
	showData(iSL);

	Pop_back(iSL);
	Pop_front(iSL);
	showData(iSL);

	deleteSL(iSL);

	SList<char>* cSL = new SList<char>;
	Push_back(cSL, 'a');
	Push_back(cSL, 'b');
	Push_back(cSL, 'c');
	Push_front(cSL, 'd');
	Push_front(cSL, 'e');
	showData(cSL);

	Pop_back(cSL);
	Pop_front(cSL);
	showData(cSL);

	deleteSL(cSL);

	SList<string>* sSL = new SList<string>;
	Push_back(sSL, (string)"abc");
	Push_back(sSL, (string)"def");
	Push_back(sSL, (string)"ghi");
	Push_front(sSL, (string)"jkl");
	Push_front(sSL, (string)"mn");
	showData(sSL);

	Pop_back(sSL);
	Pop_front(sSL);
	showData(sSL);

	deleteSL(sSL);

	return 0;
}